package com.HuiShou.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.HuiShou.common.annotation.Excel;
import com.HuiShou.common.core.domain.BaseEntity;

/**
 * 回收站点信息对象 collection_point
 * 
 * @author lyz
 * @date 2025-03-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CollectionPoint extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 回收点唯一ID */
    private String pointId;

    /** 详细地址或GPS坐标（格式：纬度,经度） */
    @Excel(name = "详细地址或GPS坐标", readConverterExp = "格=式：纬度,经度")
    private String location;

    /** 负责人ID（关联用户表） */
    @Excel(name = "负责人ID", readConverterExp = "关=联用户表")
    private Long managerId;

    /** 最大存储容量（单位：公斤） */
    @Excel(name = "最大存储容量", readConverterExp = "单=位：公斤")
    private BigDecimal capacity;

    /** 纬度 */
    @Excel(name = "纬度")
    private Double latitude;

    /** 经度 */
    @Excel(name = "经度")
    private Double longitude;

    /** 状态：active(正常)/maintenance(维护)/closed(关闭) */
    @Excel(name = "状态：active(正常)/maintenance(维护)/closed(关闭)")
    private String status;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date createdAt;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date updatedAt;

    /** 用户纬度 */
    @TableField(exist = false)
    private Double userLatitude;

    /** 用户经度 */
    @TableField(exist = false)
    private Double userLongitude;

    @TableField(exist = false)
    private Double distance;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("pointId", getPointId())
                .append("location", getLocation())
                .append("managerId", getManagerId())
                .append("longitude",getLongitude())
                .append("latitude",getLatitude())
                .append("capacity", getCapacity())
                .append("status", getStatus())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }
}
